package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_ctdt_khoinganh")
public class Tbl_CTDT_KhoiNganh implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private String ma;
   private Integer khoaHoc;
   private Double soTinChi;
   private Tbl_CTDT_ChuyenNganh chuyenNganhId = null;
   private Tbl_CTDT_HeDaoTao heDaoTaoId = null;
   private Boolean taiNangYN;

  
@Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }
   
   public Boolean getTaiNangYN() {
		return taiNangYN;
	}
	public void setTaiNangYN(Boolean taiNangYN) {
		this.taiNangYN = taiNangYN;
	}

   public String getMa() {
   	return ma;
   }
   public void setMa(String ma) {
   	this.ma= ma;
   }

   public Integer getKhoaHoc() {
   	return khoaHoc;
   }
   public void setKhoaHoc(Integer khoaHoc) {
   	this.khoaHoc= khoaHoc;
   }

   public Double getSoTinChi() {
   	return soTinChi;
   }
   public void setSoTinChi(Double soTinChi) {
   	this.soTinChi= soTinChi;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="ChuyenNganhId")
   @ForeignKey(name="FK_tbl_CTDT_ChuyenNganh_tbl_CTDT_KhoiNganh")
   public Tbl_CTDT_ChuyenNganh getChuyenNganhId() {
	    return chuyenNganhId;
   }
   public void setChuyenNganhId(Tbl_CTDT_ChuyenNganh chuyenNganhId) {
	    this.chuyenNganhId=chuyenNganhId;
   }
   
   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="HeDaoTaoId")
   @ForeignKey(name="FK_tbl_CTDT_HeDaoTao_tbl_CTDT_KhoiNganh")
   public Tbl_CTDT_HeDaoTao getHeDaoTaoId() {
	    return heDaoTaoId;
   }
   public void setHeDaoTaoId(Tbl_CTDT_HeDaoTao heDaoTaoId) {
	    this.heDaoTaoId=heDaoTaoId;
   }
}//endClass 

